Interface sjl.ForwardIterator
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface sjl.ForwardIterator

public interface ForwardIterator
extends Object
extends InputIterator, OutputIterator
Defines the methods allowed on forward iterators. A forward iterator allow multiple passes over the container.

Copyright © 1996 Finn Bock


Method Index

 o distance(Iterator)
Return the number of times this must be advanced (with next()) in order to reach target.
 o setTo(Iterator)
Set the position of this iterator to the same position as another iterator.

Methods

 o distance
  public abstract int distance(Iterator target)
Return the number of times this must be advanced (with next()) in order to reach target. It is required that both this and target must point to the same container.
Parameters:
target - the destination iterator.
 o setTo
  public abstract void setTo(Iterator i)
Set the position of this iterator to the same position as another iterator. The two iterator must be same, or a casting error occurs.

All Packages  Class Hierarchy  This Package  Previous  Next  Index